package com.ruoyi.bookbus.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bookbus.mapper.BookAddressMapper;
import com.ruoyi.bookbus.domain.BookAddress;
import com.ruoyi.bookbus.service.IBookAddressService;

/**
 * 收货地址Service业务层处理
 * 
 * @author zsq-cj
 * @date 2025-10-21
 */
@Service
public class BookAddressServiceImpl implements IBookAddressService 
{
    @Autowired
    private BookAddressMapper bookAddressMapper;

    /**
     * 查询收货地址
     * 
     * @param id 收货地址主键
     * @return 收货地址
     */
    @Override
    public BookAddress selectBookAddressById(Long id)
    {
        return bookAddressMapper.selectBookAddressById(id);
    }

    /**
     * 查询收货地址列表
     * 
     * @param bookAddress 收货地址
     * @return 收货地址
     */
    @Override
    public List<BookAddress> selectBookAddressList(BookAddress bookAddress)
    {
        return bookAddressMapper.selectBookAddressList(bookAddress);
    }

    /**
     * 新增收货地址
     * 
     * @param bookAddress 收货地址
     * @return 结果
     */
    @Override
    public int insertBookAddress(BookAddress bookAddress)
    {
        return bookAddressMapper.insertBookAddress(bookAddress);
    }

    /**
     * 修改收货地址
     * 
     * @param bookAddress 收货地址
     * @return 结果
     */
    @Override
    public int updateBookAddress(BookAddress bookAddress)
    {
        return bookAddressMapper.updateBookAddress(bookAddress);
    }

    /**
     * 批量删除收货地址
     * 
     * @param ids 需要删除的收货地址主键
     * @return 结果
     */
    @Override
    public int deleteBookAddressByIds(Long[] ids)
    {
        return bookAddressMapper.deleteBookAddressByIds(ids);
    }

    /**
     * 删除收货地址信息
     * 
     * @param id 收货地址主键
     * @return 结果
     */
    @Override
    public int deleteBookAddressById(Long id)
    {
        return bookAddressMapper.deleteBookAddressById(id);
    }
}
